home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Ebooks / Thinking in C++ V2 / C20 / ProgVals.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-25  |  592 b   |  22 lines

  1. //: C20:ProgVals.h
  2. // From Thinking in C++, 2nd Edition
  3. // Available at http://www.BruceEckel.com
  4. // (c) Bruce Eckel 1999
  5. // Copyright notice in Copyright.txt
  6. // Program values can be changed by command line
  7. #ifndef PROGVALS_H
  8. #define PROGVALS_H
  9. #include <map>
  10. #include <iostream>
  11. #include <string>
  12.  
  13. class ProgVals 
  14.   : public std::map<std::string, std::string> {
  15. public:
  16.   ProgVals(std::string defaults[][2], int sz);
  17.   void parse(int argc, char* argv[],
  18.     std::string usage, int offset = 1);
  19.   void print(std::ostream& out = std::cout);
  20. };
  21. #endif // PROGVALS_H ///:~
  22.